home *** CD-ROM | disk | FTP | other *** search
- /* bdos2.c --- p554 */
- #include <stdio.h>
- #include <dos.h>
- #define DOS_KBDIN 1
- #define DOS_DISPCHAR 2
- main()
- {
- unsigned int ch_read;
- /* First read a character. (see BDOS example) */
- ch_read = bdos(DOS_KBDIN, 0, 0) & 0xff;
- /* Now display the character. DX is the charater.
- * Nothing is needed in AL. */
- printf("\nHere's what you typed: ");
- bdos(DOS_DISPCHAR, ch_read, 0);
- }